package model

import (
	"example/initDB"
	"fmt"
	"log"
)

type FileModel struct {
	Id   string
	Path string
}

func (uf *FileModel) Save() int64 {
	res, e := initDB.Db.Exec("insert into hello.upload (path) values (?);", uf.Path)
	if e != nil {
		log.Panicln("err", e)
	}
	fmt.Println("res", res)
	id, err := res.LastInsertId()
	if err != nil {
	}
	return id
}
